class Solution:
    def isPerfectSquare(self, num: int) -> bool:
        i = 1
        t = 1
        while t<=num:
            if t == num:
                return True
            i+=1
            t = i*i
        return False


if __name__ == '__main__':
    so = Solution()
    x = 16
    r = so.isPerfectSquare(x)
    print(r)
